<%--
  Created by IntelliJ IDEA.
  User: 10171225
  Date: 2016/6/20
  Time: 11:37
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<html>
<head>
    <base href="<%=basePath%>"/>
    <title>文章管理</title>
    <link rel="stylesheet" href="static/themes/bootstrap/easyui.css">
    <link rel="stylesheet" href="static/css/base.css">
    <script src="static/javascript/jquery-1.11.3.min.js"></script>
    <script src="static/javascript/jquery.easyui.min.js"></script>
    <script src="static/javascript/utils.js"></script>
    <script src="static/javascript/base.js"></script>

    <link rel="stylesheet" href="plugins/bootstrap-3.3.5-dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="plugins/bootstrap-3.3.5-dist/css/bootstrap-theme.min.css">
    <script src="plugins/bootstrap-3.3.5-dist/js/bootstrap.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            var mainId = "#articleMain";
            var mainUrlPath = "admin/articleManage";
            function toggleItem(item) {
                $(".list-group li").each(function () {
                    $(this).removeClass("active");
                });
                item.addClass("active");
            }
            function loadMainContent(url) {
                obj=$.ajax({url:url,async:false});
                $(mainId).html(obj.responseText);
            }
            $("#allArticles").click(function () {
                toggleItem($(this));
                loadMainContent(mainUrlPath + "/allArticles");
            });
            $("#reviewedArticles").click(function () {
                toggleItem($(this));
                loadMainContent(mainUrlPath + "/reviewedArticles");
            });
            $("#unReviewedArticles").click(function () {
                toggleItem($(this));
                loadMainContent(mainUrlPath + "/unReviewedArticles");
            });

            $(".list-group :first-child").click();
        });
    </script>
</head>
<body>
<div class="row paddingTop">
    <div class="col-xs-3 col-sm-3 col-md-3">
        <ul class="list-group">
            <li class="list-group-item" id="allArticles">所有文章列表</li>
            <li class="list-group-item" id="unReviewedArticles">待审核文章列表</li>
            <li class="list-group-item" id="reviewedArticles">已审核文章列表</li>
        </ul>
    </div>
    <div class="col-xs-9 col-sm-9 col-md-9">
        <div id="articleMain" class="paddingLeft"></div>
    </div>
</div>
</body>
</html>